package com.easy.core;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
/**
 * 
 * @author jason
 *
 */
public class BootStrap {
	
	private static Worker worker0 = null;
	private Executor workExecutor = Executors.newFixedThreadPool(1, new NamedThreadFactory("EasyWorker"));
		
	public BootStrap() {
		
	}
	public void initWorkers(int TaskThreadCounts){	
		Executor taskExecutor = Executors.newFixedThreadPool(TaskThreadCounts,new NamedThreadFactory("EasyWorker-TaskThread"));
		worker0 = new Worker(taskExecutor);	
		workExecutor.execute(worker0);
	}
	
	public static Worker getWorker0(){
		return worker0;
	}
}
